Set up PHPStan on GitHub Actions#472
Set up PHPStan on GitHub Actions#472nhedger wants to merge 3 commits intoreactphp:1.xfrom nhedger:ci/phpstan
Conversation
| excludePaths: | ||
| - src/Server.php |
There was a problem hiding this comment.
I had to exclude this file because otherwise I could not generate the baseline.
This is due to the Server class attempting to extend the final HttpServer class
|
The generated baseline produces different results on different operating systems. The pipeline succeeds when running on macOS but fails when running on Ubuntu (in the GitHub Actions runner at least). It seems to complain about a method not being defined although the method is defined. I cannot find a reason for this currently. Possible solutionAs a temporary solution, I could probably ignore the problematic files, which are examples anyway. |
|
For the reference: It looks like this wasn't closed intentionally (as discussed in reactphp/async#64). We've recently started applying PHPStan on max level into our projects with reactphp/async#76 and we'll go ahead with this and apply PHPStan on max level to all our projects in the future. Thank you very much for your contribution and sparking this discussion! 👍 |
This PR sets up PHPStan to run on GitHub Actions, as discussed in discussions#469.
Overview
examples,srcandtestsfoldersBaseline
Because this PR aims to set up PHPStan and not address the errors it reports, I've generated a baseline to make the pipeline succeed. We'll then be able to incrementally fix the problems in future PRs.